Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/source-map-support

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/source-map-support

TypeScript definitions for source-map-support

  • 0.4.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/source-map-support?

@types/source-map-support provides TypeScript type definitions for the source-map-support package, which is used to enhance the debugging experience by providing better stack traces with source maps.

What are @types/source-map-support's main functionalities?

Install Source Map Support

This feature allows you to install source map support in your Node.js application, enabling better stack traces that map to the original source code.

const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();

Uninstall Source Map Support

This feature allows you to uninstall source map support, reverting to the default stack trace behavior.

const sourceMapSupport = require('source-map-support');
sourceMapSupport.uninstall();

Customizing Source Map Retrieval

This feature allows you to customize how source maps are retrieved, providing a function that returns the source map for a given source file.

const sourceMapSupport = require('source-map-support');
sourceMapSupport.install({
  retrieveSourceMap: function(source) {
    if (source === 'compiled.js') {
      return {
        url: 'compiled.js',
        map: fs.readFileSync('compiled.js.map', 'utf8')
      };
    }
    return null;
  }
});

Other packages similar to @types/source-map-support

FAQs

Package last updated on 13 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc